package com.zhiyou.factory;

public class Factory {
	
	//提供一个对象
	/**
	 * 
	 * @param flag  1移动    2联通
	 * @return  返回一个对象
	 */
	public static Contact getContact(int flag){
		Contact contact =  null;
		if (flag == 1) {
			contact = new YiDong();
		}
		else {
			contact = new LinTong();
		}
		return contact;
	}

}
